package com.milepost.workflow.common.enums;

/**
 * @author huarf
 * @Description
 * @create 2022-03-28 12:11
 */
public enum PassEnum {
    REFUSE(0, "审批拒绝"),
    AGREE(1, "审批通过"),
    WAITING(2, "已开始未完成。"),
    NOT_START(3, "未开始");

    private final int code;
    private final String des;

    PassEnum(int code, String des) {

        this.code = code;
        this.des = des;
    }

    public int getCode() {

        return code;
    }

    public String getDes() {

        return des;
    }

    public static PassEnum of(int code) {
        for (PassEnum v :PassEnum.values()){
            if (v.getCode() == code) {
                return v;
            }
        }
        return null;
    }
}
